﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<Blog.Models.Article>" %>
<%@ Import Namespace="Blog.Helper" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	Edit
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

    <h2>Edit</h2>

    <% using (Html.BeginForm()) {%>
        <%= Html.ValidationSummary(true) %>
        
        <fieldset>
            <legend>Fields</legend>
            
            <div class="editor-label">
                <%= Html.LabelFor(model => model.ArticleId) %>
            </div>
            <div class="editor-field">
                <%= Html.TextBoxFor(model => model.ArticleId) %>
                <%= Html.ValidationMessageFor(model => model.ArticleId) %>
            </div>
            
            <div class="editor-label">
                <%= Html.LabelFor(model => model.CatalogId) %>
            </div>
            <div class="editor-field">
                <%= Html.TextBoxFor(model => model.CatalogId) %>
                <%= Html.ValidationMessageFor(model => model.CatalogId) %>
            </div>
            
            <div class="editor-label">
                <%= Html.LabelFor(model => model.Body) %>
            </div>
            <div class="editor-field">
                 <%=Html.RichTextInitForFrontEnd("Body","") %>
                 <%=Html.TextAreaFor(model=>model.Body) %>
                <%= Html.ValidationMessageFor(model => model.Body) %>
            </div>
            
            <div class="editor-label">
                <%= Html.LabelFor(model => model.TiTle) %>
            </div>
            <div class="editor-field">
                <%= Html.TextBoxFor(model => model.TiTle) %>
                <%= Html.ValidationMessageFor(model => model.TiTle) %>
            </div>
            <div class="editor-label">
                <%= Html.LabelFor(model => model.Introduce) %>
            </div>
            <div class="editor-field">
                <%= Html.TextBoxFor(model => model.Introduce)%>
                <%= Html.ValidationMessageFor(model => model.Introduce)%>
            </div>           
            <p>
                <input type="submit" value="Save" />
            </p>
        </fieldset>

    <% } %>

    <div>
        <%= Html.ActionLink("Back to List", "Index",new {Controller="Home"}) %>
    </div>

</asp:Content>

